// Have include guard.
#ifndef FPK_JOYSTICKVALUE_HPP
#define FPK_JOYSTICKVALUE_HPP

// Include files.
#include "WPILib.h"

/**
 *  The JoystickValue struct stores only the x-axis and y-axis data of a joystick.
 */
struct JoystickValue
{
	private:
		float m_x;
		float m_y;
	public:
		/**
		 *  Constructor for JoystickValue.
		 *  
		 *  @param x The value of the x-axis.
		 *  @param y The value of the y-axis.
		 */
		inline JoystickValue(float x, float y)
		{
			m_x = x;
			m_y = y;
		}
		
		/**
		 *  Constructor for JoystickValue.
		 *  
		 *  @param joystick The joystick from which to obtain the x-axis and y-axis values.
		 */
		inline explicit JoystickValue(GenericHID &joystick)
		{
			m_x = joystick.GetX();
			m_y = joystick.GetY();
		}
		
		/**
		 *  Get the stored x-axis value.
		 *  
		 *  @return The stored x-axis value.
		 */
		inline float GetX() const
		{
			return m_x;
		}
		
		/**
		 *  Get the stored y-axis value.
		 *  
		 *  @return The stored y-axis value.
		 */
		inline float GetY() const
		{
			return m_y;
		}
};

#endif // #ifndef FPK_JOYSTICKVALUE_HPP
